home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1997 May / PC Plus Super CD Issue 127 (May 1997).iso / componen / appli / demo / applink.bas < prev    next >
Encoding:
BASIC Source File  |  1995-03-07  |  6.5 KB  |  102 lines

  1. '/*****************************************************************************\
  2. '*                                                                             *
  3. '* APPLINK.BAS  - App-Link Constants File                                      *
  4. '*                                                                             *
  5. '*                Version 1.1                                                  *
  6. '*                                                                             *
  7. '*                1992-1995 Synergy Software Technologies Inc.                 *
  8. '*                                                                             *
  9. '\*****************************************************************************/
  10.  
  11. 'Command property settings
  12.  
  13. Global Const SENDMSG = 1                       'send message to destination
  14. Global Const RECVMSG = 2                       'dispatch queued message
  15.  
  16. 'Flag property settings
  17.  
  18. Global Const DEFAULT_FLAGS = &H0&              'synchronous, non-queued message
  19. Global Const QUEUE_MSG = &H1&                  'queue message at destination
  20. Global Const START_DEST_APP = &H2&             'load app if not already loaded
  21. Global Const START_SINGLE_INSTANCE = &H2&      'load app if not already loaded
  22. Global Const NO_WAIT = &H4&                    'send message asynchonously
  23. Global Const START_MULTI_INSTANCE = &H10&      'load another instance of app
  24.  
  25. 'Protocol property settings
  26.                                                
  27. Global Const NETBIOS = 0                       'remote communications via NetBIOS
  28.  
  29. 'Other miscellaneous constants
  30.  
  31. Global Const INFINITE_WAIT = -1&               'no timeout, wait forever for reply
  32. Global Const DEFAULT_TIMEOUT = 10000&          'default timeout value (10 seconds)
  33.  
  34. 'Error codes
  35.  
  36. Global Const ALERR_NO_ERROR = 0&               'no errors encountered
  37. Global Const ALERR_SYS_ERROR = 20000&          'system error
  38. Global Const ALERR_MEM_ALLOC = 20001&          'unable to allocate memory
  39. Global Const ALERR_APP_LOAD = 20002&           'unable to load application
  40. Global Const ALERR_GET_NODENAME = 20500&       'unable to query node name
  41. Global Const ALERR_REQ_ABORTED = 20501&        'request aborted
  42. Global Const ALERR_XACT_FAILURE = 20502&       'transaction failure
  43. Global Const ALERR_NIT_NOTFOUND = 20503&       'unable to locate net instance
  44. Global Const ALERR_SKT_OPEN = 20504&           'duplicate socket name
  45. Global Const ALERR_SKT_NOTFOUND = 20505&       'unable to locate socket
  46. Global Const ALERR_CONV_NOTFOUND = 20506&      'unable to locate conversation
  47. Global Const ALERR_QUEUE_EMPTY = 20507&        'socket message queue is empty
  48. Global Const ALERR_QRY_TASKINFO = 20508&       'unable to query task information
  49. Global Const ALERR_REG_OBJCLASS = 20509&       'unable to register object class
  50. Global Const ALERR_TIMEOUT = 20510&            'timeout occurred
  51. Global Const ALERR_CONNECT = 20511&            'unable to establish connection
  52. Global Const ALERR_INVALID_PRIORITY = 20512&   'invalid message priority
  53. Global Const ALERR_INVALID_TIMEOUT = 20513&    'invalid timeout value
  54. Global Const ALERR_INVALID_MSGLEN = 20514&     'invalid message length
  55. Global Const ALERR_INVALID_MSGPTR = 20515&     'invalid message pointer
  56. Global Const ALERR_INVALID_LSN = 20516&        'invalid local session number
  57. Global Const ALERR_NO_REM_RESOURCE = 20517&    'no remote resources available
  58. Global Const ALERR_SESS_CLOSED = 20518&        'network session was closed
  59. Global Const ALERR_CMD_CANCELED = 20519&       'network command canceled
  60. Global Const ALERR_SESS_TAB_FULL = 20522&      'network session table is full
  61. Global Const ALERR_NO_ANSWER = 20523&          'no answer from partner
  62. Global Const ALERR_NAME_NOT_FOUND = 20524&     'unable to find network name
  63. Global Const ALERR_TOO_MANY_CMDS = 20525&      'too many network commands
  64. Global Const ALERR_ADAPTER_MALFUNC = 20526&    'network adapter malfunction
  65. Global Const ALERR_NET_BUSY = 20528&           'synchronous transaction pending
  66. Global Const ALERR_POSTMESSAGE_FAIL = 20529&   'postmessage failed
  67. Global Const ALERR_NETSERVER_LOAD = 20530&     'unable to load net server
  68. Global Const ALERR_REGISTER_HANDLER = 20531&   'unable to register fault handler
  69. Global Const ALERR_CREATE_OBJWIN = 20532&      'unable to create object window
  70. Global Const ALERR_CREATE_STR = 20533&         'ddecreatestringhandle failed
  71. Global Const ALERR_REGISTER_SKT = 20534&       'unable to register service name
  72. Global Const ALERR_CONN_DROPPED = 20535&       'dest socket disconnect prematurely
  73. Global Const ALERR_NO_DEST = 20536&            'destination is missing
  74. Global Const ALERR_BLANKS_IN_DEST = 20537&     'destination contains blanks
  75. Global Const ALERR_SEPARATOR_MISS = 20538&     'dest does not contain node separator
  76. Global Const ALERR_NODENAME_SIZE = 20539&      'invalid node name length
  77. Global Const ALERR_NO_SOCKETNAME = 20540&      'socket name is missing
  78. Global Const ALERR_SOCKETNAME_SIZE = 20541&    'invalid socket name length
  79. Global Const ALERR_BAD_SEPARATOR = 20542&      'invalid separator in socket name
  80. Global Const ALERR_BLANKS_IN_SKT = 20543&      'socket name contains blanks
  81. Global Const ALERR_APP_CLOSE = 20544&          'application terminated
  82. Global Const ALERR_DAEMON_LOAD = 20545&        'unable to load daemon task
  83. Global Const ALERR_NO_FREE_CONN = 20546&       'server connection table is full
  84. Global Const ALERR_SKT_DISABLED = 20547&       'socket is disabled
  85. Global Const ALERR_NULL_PTR = 20548&           'null parameter pointer
  86. Global Const ALERR_STR_NOT_FOUND = 20549&      'string resource was not found
  87. Global Const ALERR_BUF_TOO_SMALL = 20550&      'input buffer is too small
  88. Global Const ALERR_QUERY_STR = 20551&          'ddequerystring failed
  89. Global Const ALERR_CANT_SET_PROPERTY = 20552&  'socket property is read-only
  90. Global Const ALERR_INVALID_PROTOCOL = 20553&   'invalid protocol option
  91. Global Const ALERR_INVALID_QSTORAGE = 20554&   'invalid queue storage option
  92. Global Const ALERR_INVALID_QACCESS = 20555&    'invalid queue access option
  93. Global Const ALERR_INVALID_HANDLER = 20556&    'socket handler was not specified
  94. Global Const ALERR_UNKNOWN_METHOD = 30000&     'unknown method
  95.                                                
  96. 'Function prototypes
  97.  
  98. Declare Function AplkVBTypeToString Lib "APPLINK.VBX" (lpvSrc As Any, ByVal cb As Long) As String
  99. Declare Sub AplkStringToVBType Lib "APPLINK.VBX" (lpvDest As Any, ByVal lpvSrc As String, ByVal cb As Long)
  100. Declare Function MessageBox Lib "User" (ByVal hWnd As Integer, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Integer) As Integer
  101.  
  102.